#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "CombinedFragment.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class NamedElement;

/// <summary>
/// ConsiderIgnoreFragment
/// A ConsiderIgnoreFragment is a kind of CombinedFragment that is used for the
/// consider and ignore cases, which require lists of pertinent Messages to be
/// specified.
/// </summary>
class UMLMODEL_EXPORT ConsiderIgnoreFragment : public CombinedFragment {

public: // Constructors and destructors
    explicit ConsiderIgnoreFragment(const QString& umlType="uml::ConsiderIgnoreFragment");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// messages getter
    /// The set of messages that apply to this fragment.
    /// </summary>
    vector<shared_ptr<NamedElement>>& messages();

private: // Fields
    /// <summary>
    /// messages
    /// The set of messages that apply to this fragment.
    /// </summary>
    vector<shared_ptr<NamedElement>> messages_;

};

} // namespace uml
